<template>
  <div id="app">
    <input @click="sendMsg" type="button" value="给父组件传递值">
  </div>
</template>

<script>
export default {
  data(){
    return{
      msg: "我是子组件的msg哟",
    }
  },
  methods:{
    sendMsg(){
      this.$emit("parsent",this.msg)
    }
  }
}
</script>

<style lang="scss">

</style>
